﻿namespace StudyEnglish.Application.Filter
{
    public class BaseFilterItem
    {
        /// <summary>
        /// Item id (required for filter analysis and applying filter settings to the DB query
        /// </summary>
        public int Id;

        /// <summary>
        /// Name of the filter - is shown on the page
        /// </summary>
        public string Name;

        /// <summary>
        /// Indicates whether filter is selected
        /// </summary>
        public bool IsSelected;

        /// <summary>
        /// Filter key. Requires to build unique URL
        /// </summary>
        public int Key;

        /// <summary>
        /// A link to the filter category
        /// </summary>
        public BaseFilterCategory ParentCategory;

        /// <summary>
        /// Returns full "path" that identificates current filter item
        /// </summary>
        /// <returns></returns>
        public string GetFullItemKey()
        {
            return ParentCategory.Key + Key.ToString();
        }
    }
}
